package cn.juque.jdfsystem.enums;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>HttpMessageTypeEnum</li>
 * </ul>
 * @date 2023-01-11 17:26:50
 **/
public enum HttpMessageTypeEnum {

    /**
     * enum
     */
    REGISTER_CHANGE("REGISTER_CHANGE", "注册信息发生变更"),
    CONFIG_CHANGE("CONFIG_CHANGE", "配置信息发生变更"),

    FILE_ADD("FILE_ADD", "文件新增"),
    FILE_CHANGE("FILE_CHANGE", "文件状态变更"),

    FILE_DEL("FILE_DEL", "删除文件"),

    PLATFORM_CHANGE("PLATFORM_CHANGE", "平台信息变更"),
    ;
    private final String value;

    private final String label;

    HttpMessageTypeEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public static Boolean equal(HttpMessageTypeEnum typeEnum1, HttpMessageTypeEnum typeEnum2) {
        if(null == typeEnum1 && null == typeEnum2) {
            return false;
        }
        if(null == typeEnum1) {
            return false;
        }
        if(null == typeEnum2) {
            return false;
        }
        return typeEnum1.getValue().equals(typeEnum2.getValue());
    }
}
